package com.then.libary.view;

import com.then.libary.activity.R;

import android.app.Activity;
import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.ImageView;

public class HeadView {

	private Context contxt;
	private Activity activity;
	private SlideMenu slideMenu;
	private ImageView menuImageView;

	public HeadView(Context contxt, Activity activity, SlideMenu slideMenu) {
		super();
		this.contxt = contxt;
		this.activity = activity;
		this.slideMenu = slideMenu;
		initUl();
	}

	private void initUl() {
		// TODO Auto-generated method stub
		
		menuImageView = (ImageView) activity.findViewById(R.id.head_menu_btn);
	
		menuImageView.setOnTouchListener(new OnTouchListener() {

			@Override
			public boolean onTouch(View v, MotionEvent event) {
				// TODO Auto-generated method stub
				if (event.getAction() == MotionEvent.ACTION_DOWN) {
					slideMenu.Menu();
				} else if (event.getAction() == MotionEvent.ACTION_UP) {

				}
				return false;
			}
		});

	}

}
